package com.java.system.common.entity.system;

import com.java.system.common.entity.BaseEntity;
import com.java.system.common.entity.admin.SysCompany;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @ClassName: SysMachine实体类
 * @Description:
 * @Version: v1.0.0
 * @Author: Shan Feiyang
 * @Date: 2019-09-05 11:21:40
 */
@ApiModel(value = "设备表")
@Table(name = "sys_machine")
@Data
@Accessors(chain = true)
public class SysMachine extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 设备编码
     */
    @Column(name = "code")
    @ApiModelProperty(value = "设备编码")
    private String code;

    /**
     * 所属型号
     */
    @Column(name = "model_id")
    @ApiModelProperty(value = "所属型号")
    private String modelId;

    /**
     * 状态: 0 = 锁定，1 = 待激活，2 = 待验证，3 = 正常
     */
    @Column(name = "status")
    @ApiModelProperty(value = "状态: 0 = 锁定，1 = 待激活，2 = 待验证，3 = 正常")
    private Integer status;

    /**
     * 绑定手机号码
     */
    @Column(name = "band_phone")
    @ApiModelProperty(value = "绑定手机号码")
    private String bandPhone;

    /**
     * 手机卡类型：mobile（移动）  unicom（联通）
     */
    @Column(name = "card_type")
    @ApiModelProperty(value = "手机卡类型：mobile（移动）  unicom（联通）")
    private String cardType;

    /**
     * 是否九阳锁定：0 = 否, 1 = 是）
     */
    @Column(name = "is_jy_lock")
    @ApiModelProperty(value = "是否九阳锁定：0 = 否, 1 = 是）")
    private Integer isJyLock;

    /**
     * 经度
     */
    @Column(name = "longitude")
    @ApiModelProperty(value = "经度")
    private String longitude;

    /**
     * 纬度
     */
    @Column(name = "latitude")
    @ApiModelProperty(value = "纬度")
    private String latitude;

    /**
     * ICID
     */
    @Column(name = "iccid")
    @ApiModelProperty(value = "ICCID")
    private String iccid;
    /**
     * 操作序列号
     */
    @Column(name = "seqnum")
    @ApiModelProperty(value = "操作序列号")
    private String seqnum;

    /**
     * 密钥
     */
    @Column(name = "opt_key")
    @ApiModelProperty(value = "密钥")
    private String optKey;

    /**
     * 临时key
     */
    @Column(name = "temp_key")
    @ApiModelProperty(value = "临时key")
    private String tempKey;

    /**
     * 短信发送渠道：GSM_MODEM 短信猫 SMARTCARD智能物联网卡
     */
    @Column(name = "sms_channel")
    @ApiModelProperty(value = "短信发送渠道：GSM_MODEM 短信猫 SMARTCARD智能物联网卡")
    private String smsChannel;

    /**
     * 热档数量
     */
    @Column(name = "heatnum")
    @ApiModelProperty(value = "热档数量")
    private Integer heatnum;

    /**
     * 冷档数量
     */
    @Column(name = "coolnum")
    @ApiModelProperty(value = "冷档数量")
    private Integer coolnum;

    /**
     * 是否IOT设备: 0 = 否， 1 = 是
     */
    @Column(name = "is_iot_mac")
    @ApiModelProperty(value = "是否IOT设备: 0 = 否， 1 = 是")
    private Integer isIotMac;

    /**
     * IOT设备密钥
     */
    @Column(name = "iot_secret")
    @ApiModelProperty(value = "IOT设备密钥")
    private String iotSecret;

    /**
     * IOT通讯类型:0 = 同步，1 = 异步
     */
    @Column(name = "iot_commication_type")
    @ApiModelProperty(value = "IOT通讯类型:0 = 同步，1 = 异步")
    private Integer iotCommicationType;

    /**
     * 阿里云iot-id
     */
    @Column(name = "iot_id")
    @ApiModelProperty(value = "阿里云iot-id")
    private String iotId;

    /**
     * 经销商名称
     */
    @Transient
    private SysCompany company;

    /**
     * 设备型号
     */
    @Transient
    private SysMachineModel model;

    @Transient
    private SysMachineExtra machineExtra;
}